﻿using SanJ.FreeCare.ObservationDefinitionItems;
using SanJ.FreeCare.ObservationDefinitions;
using SanJ.FreeCare.Peis.Configure.DetailPage;
using SanJ.FreeCare.Peis.Configure.Nursestation.RegisterStation;
using SanJ.FreeCare.Peis.Configure.ProjectPage;
using SanJ.FreeCare.Peis.Configure.RoomPage;
using SanJ.FreeCare.ValueSets;
using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;

namespace SanJ.FreeCare.Peis
{
    public partial class PeisAppService : FreeCareAppService, IPeisAppService
    {
        public async Task<ListResultDto<ProjectDto>> GetProjectListForNurseAsync(GetProjectListInput input)
        {
            var totalCount = await _observationDefinitionManager.GetCountAsync(input.FilterText);
            var items = await _observationDefinitionManager.GetPageLisAsync(input.FilterText, input.Sorting, input.MaxResultCount, input.SkipCount);

            List<ProjectDto> resultItems = new List<ProjectDto>();
            foreach (var item in items)
            {
                resultItems.Add(ToProjectDto(item));
            }
            return new PagedResultDto<ProjectDto>
            {
                TotalCount = totalCount,
                Items = resultItems
            };
        }

        private ProjectDto ToProjectDto(object item)
        {
            throw new NotImplementedException();
        }
    }
}
